package com.gxa.controller;

import com.gxa.common.base.R;
import com.gxa.domain.dto.LoginFormDTO;
import com.gxa.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LoginController {

    @Autowired
    private SysUserService sysUserService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    @ResponseBody
    public R login(@RequestBody LoginFormDTO loginFormDTO){
        return sysUserService.login(loginFormDTO);
    }


}
